<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
	<title>ILM overview | ElasticSearch 7.7 权威指南中文版</title>
	<meta name="keywords" content="ElasticSearch 权威指南中文版, elasticsearch 7, es7, 实时数据分析，实时数据检索" />
    <meta name="description" content="ElasticSearch 权威指南中文版, elasticsearch 7, es7, 实时数据分析，实时数据检索" />
    <!-- Give IE8 a fighting chance -->
    <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
    <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->
	<link rel="stylesheet" type="text/css" href="../static/styles.css" />
	<script>
	var _link = 'overview-index-lifecycle-management.html';
    </script>
</head>
<body>
<div class="main-container">
    <section id="content">
        <div class="content-wrapper">
            <section id="guide" lang="zh_cn">
                <div class="container">
                    <div class="row">
                        <div class="col-xs-12 col-sm-8 col-md-8 guide-section">
                            <div style="color:gray; word-break: break-all; font-size:12px;">原英文版地址: <a href="https://www.elastic.co/guide/en/elasticsearch/reference/7.7/overview-index-lifecycle-management.html" rel="nofollow" target="_blank">https://www.elastic.co/guide/en/elasticsearch/reference/7.7/overview-index-lifecycle-management.html</a>, 原文档版权归 www.elastic.co 所有<br/>本地英文版地址: <a href="../en/overview-index-lifecycle-management.html" rel="nofollow" target="_blank">../en/overview-index-lifecycle-management.html</a></div>
                        <!-- start body -->
                  <div class="page_header">
<strong>重要</strong>: 此版本不会发布额外的bug修复或文档更新。最新信息请参考 <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html" rel="nofollow">当前版本文档</a>。
</div>
<div id="content">
<div class="breadcrumbs">
<span class="breadcrumb-link"><a href="index.html">Elasticsearch Guide [7.7]</a></span>
»
<span class="breadcrumb-link"><a href="index-lifecycle-management.html">ILM: Manage the index lifecycle</a></span>
»
<span class="breadcrumb-node">ILM overview</span>
</div>
<div class="navheader">
<span class="prev">
<a href="index-lifecycle-management.html">« ILM: Manage the index lifecycle</a>
</span>
<span class="next">
<a href="ilm-concepts.html">ILM concepts »</a>
</span>
</div>
<div class="chapter xpack">
<div class="titlepage"><div><div>
<h2 class="title">
<a id="overview-index-lifecycle-management"></a>ILM overview<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch/edit/7.7/docs/reference/ilm/ilm-overview.asciidoc">edit</a><a class="xpack_tag" href="https://www.elastic.co/subscriptions"></a>
</h2>
</div></div></div>

<p>You can create and apply Index lifecycle management (ILM) policies to automatically manage your indices
according to your performance, resiliency, and retention requirements.
Index lifecycle policies can trigger actions such as:</p>
<div class="ulist itemizedlist">
<ul class="itemizedlist">
<li class="listitem">
<span class="strong strong"><strong>Rollover</strong></span>:
Redirect an alias to begin writing to a new index when the existing index reaches a certain age, number of docs, or size.
</li>
<li class="listitem">
<span class="strong strong"><strong>Shrink</strong></span>:
Reduce the number of primary shards in an index.
</li>
<li class="listitem">
<span class="strong strong"><strong>Force merge</strong></span>:
Manually trigger a merge to reduce the number of segments in each shard of an index
and free up the space used by deleted documents.
</li>
<li class="listitem">
<span class="strong strong"><strong>Freeze</strong></span>:
Make an index read-only and minimize its memory footprint.
</li>
<li class="listitem">
<span class="strong strong"><strong>Delete</strong></span>: Permanently remove an index, including all of its data and metadata.
</li>
</ul>
</div>
<p>ILM makes it easier to manage indices in hot-warm-cold architectures,
which are common when you’re working with time-series data such as logs and metrics.</p>
<p>You can specify:</p>
<div class="ulist itemizedlist">
<ul class="itemizedlist">
<li class="listitem">
The maximum shard size, number of documents, or age at which you want to roll over to a new index.
</li>
<li class="listitem">
The point at which the index is no longer being updated and the number of
primary shards can be reduced.
</li>
<li class="listitem">
When to force a merge to permanently remove documents marked for deletion.
</li>
<li class="listitem">
The point at which the index can be moved to less performant hardware.
</li>
<li class="listitem">
The point at which the availability is not as critical and the number of
replicas can be reduced.
</li>
<li class="listitem">
When the index can be safely deleted.
</li>
</ul>
</div>
<p>For example, if you are indexing metrics data from a fleet of ATMs into
Elasticsearch, you might define a policy that says:</p>
<div class="olist orderedlist">
<ol class="orderedlist">
<li class="listitem">
When the index reaches 50GB, roll over to a new index.
</li>
<li class="listitem">
Move the old index into the warm stage, mark it read only, and shrink it down
to a single shard.
</li>
<li class="listitem">
After 7 days, move the index into the cold stage and move it to less expensive
hardware.
</li>
<li class="listitem">
Delete the index once the required 30 day retention period is reached.
</li>
</ol>
</div>
<div class="important admon">
<div class="icon"></div>
<div class="admon_content">
<p>To use ILM, all nodes in a cluster must run the same version.
Although it might be possible to create and apply policies in a mixed-version cluster,
there is no guarantee they will work as intended.
Attempting to use a policy that contains actions that aren’t
supported on all nodes in a cluster will cause errors.</p>
</div>
</div>
</div>
<div class="navfooter">
<span class="prev">
<a href="index-lifecycle-management.html">« ILM: Manage the index lifecycle</a>
</span>
<span class="next">
<a href="ilm-concepts.html">ILM concepts »</a>
</span>
</div>
</div>

                  <!-- end body -->
                        </div>
                        <div class="col-xs-12 col-sm-4 col-md-4" id="right_col">
                        
                        </div>
                    </div>
                </div>
            </section>
        </div>
    </section>
</div>
<script src="../static/cn.js"></script>
</body>
</html>